<template>
  <div class="right">
    <div :title="v.brand" v-for="(v, index) in brand" :key="index" >
      <van-cell :title="v.brand" style="color:#000"></van-cell>
      <SwipeCell :x="v.brand" :y="category"></SwipeCell>
    </div>
  </div>
</template>

<script>
import SwipeCell from "./SwipeCell.vue";
import axios from "axios";
export default {
  components: {
    SwipeCell,
  },
  
  mounted() {
    this.$bus.$on("classify", (v) => {
      this.category = v;
      this.$http({
        url: "api/pro/categorybrandlist",
        method: "get",
        params: {
          category: this.category,
        },
      }).then((res) => {
        this.brand = res.data.data;
      });
    });
    this.$http({
      url: "api/pro/categorybrandlist",
      method: "get",
      params: {
        category: this.category,
      },
    }).then((res) => {
      this.brand = res.data.data;
    },rej=>{
      console.log(rej);
    });
  },
  data() {
    return {
      category: "    显卡",
      brand: [],
    };
  },
};
</script>

<style lang="scss" scoped>
.right {
  height: 168vw;
  background-color: red;
  // overflow: hidden;
}
.van-cell {
  color: red;
  font-weight: 800;
}
</style>